package com.lam.common.components.file.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.lam.common.components.file.FileDownloadUtil;
import com.lam.common.utils.file.FileUtil;

public class FileDownloadInfo {
	
	@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
	private String path;
	@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
	private Boolean exist;
	
	private String f;
	private String s;
	private int t;
	
	public FileDownloadInfo(FileBusiTypeEnum busiType, String path, Boolean exist) {
		this.path = path;
		this.exist = exist;
		this.f = FileUtil.getFileNameFromPath(path);
		this.s = FileDownloadUtil.sign(path);
		this.t = busiType.getCode();
	}
	
	public String getS() {
		return s;
	}
	public void setS(String s) {
		this.s = s;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public Boolean getExist() {
		return exist;
	}

	public void setExist(Boolean exist) {
		this.exist = exist;
	}

	public int getT() {
		return t;
	}

	public void setT(int t) {
		this.t = t;
	}

	public String getF() {
		return f;
	}

	public void setF(String f) {
		this.f = f;
	}
	
	

}
